﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:nBehaviors="clr-namespace:nRoute.Behaviors;assembly=nRoute.Framework" 
    x:Class="nRoute.Samples.ExtendedMVVM.Views.PageD"
    d:DesignHeight="300" d:DesignWidth="400">
	<i:Interaction.Behaviors>
		<nBehaviors:BridgeViewModelBehavior/>
	</i:Interaction.Behaviors>
    
    <Grid x:Name="LayoutRoot" Background="#FFBCA433">
    	<TextBox Margin="8,8,8,60" TextWrapping="Wrap" Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=Explicit}" Background="#7FFFFFFF">
    		<i:Interaction.Triggers>
    			<i:EventTrigger EventName="TextChanged">
    				<nBehaviors:UpdateBindingExplicitlyAction PropertyName="Text"/>
    			</i:EventTrigger>
    		</i:Interaction.Triggers>
    	</TextBox>
    	<Button Content="Save" Height="45" Margin="8,0,8,8" VerticalAlignment="Bottom" Background="#7FFFFFFF" FontSize="18.667">
    		<i:Interaction.Triggers>
    			<i:EventTrigger EventName="Click">
    				<nBehaviors:ExecuteCommandAction ManageEnableState="True" Command="{Binding SaveTextCommand}"/>
    			</i:EventTrigger>
    		</i:Interaction.Triggers>
    	</Button>
    </Grid>
</UserControl>
